import unittest
from parameterized import parameterized
from common.ihrm_login_read import read_login_data
from common.ihrm_login_duanyan import assert_util
from api.ihrm_login_api import IhrmLoginApi
from common.logging_util import init_log_config
from config import ihrm_log

resp =read_login_data("jjj")
class TestIhrmLogin(unittest.TestCase):
    @parameterized.expand(resp)
    def test_common_login(self,desc,req_body, status_code, success, code, msg):
        resp = IhrmLoginApi.login(req_body)
        # 断言
        assert_util(self, resp, status_code, bool(success), code, msg)
        init_log_config(ihrm_log)